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QR
87YOVzhmQwwZyJGMyVtNt0Ov5gnHD1hsEbHD7wKBiFrUcXK02I4989B5rG+gER5m
9IXpH9aCostjvMS/Sl29frvdJViIv//BBqeiU6S4NBSlvt50MfDiIDv0MpQ5u2k4
gvQdrQgMlDRZ74q2WOpTwtv1ZQnaCscTHhWupCJdsOGwMOo4o7XWmNnDqVAUtLlY
lWhNmsf4yh8RAqUnZR6knIA8qdHQcFECeQCUBDfXNjHKuz2TUK3QhP38ck44d/J+
PBHtqTL1zwFQr9LaDCjR7atfyM7TVFerWCoetCNX9QmZF23eUHjIzq+4q41br/gV
hxSq8KHoDivBVWHpD/WnoOPGp83J0dSULB1yj7Mcn2FNlcPDLrvMU60wiD/JoCiT
GZECgYhWu3LjbaE8QGl5LGmbUecjwNADrPHUVMgdUS3miLNUNQojwH1L1kYkznvu
aN3DHDo1oZl8HTNiFVCuuGPN0EHG1800ozVFeXYmoqnzxo+0MKz4HuALbzFwfezm
km68yAQuwrX68A0UR5wzGoyMwt5FRCwVGk/QOU4bj+ZylRQ0okuvrDZaXq+0
-----END RSA PRIVATE KEY-----"""

private_key = rsa.PrivateKey.load_pkcs1(pk)
b64=b"""H9rNKcbQQ65hwmueyMJyRUfOjCBrwULuvY6UU6stIP6ZTfVgOadznJI0QzKti2kABwanwQ1z9gW85LxWOHlVwy9RJQeLRLPWtMii3QTuIs+GXzzKZ5/inB0yrmTwr53xT4j2wJh3E9ZqD//INApgJoKLF6u0s78WOpY3LEKq9fGaRvaQxtBC9wEtU2lRBPPa8Z3t2Sg3TL+yrHr5hUIaxTKAVYlUVs71L8DjM4qjyedQxxkHHI9C0MceognTeQ3zS7RucEMOzcO6jR/JzO5b0VkFSfXmdcAFMylrn3aRHdpI1TEL6OcWbXcCakO2WYE9MFYSVUfhC23HNqrttuBY1Q=="""

encrypted= base64.b64decode(b64)

message = rsa.decrypt(encrypted, private_key)

print('encrypted:%s' % encrypted)
print('message:%s' % message)



